-
Notifications
You must be signed in to change notification settings - Fork 188
[dashboard | statistics] Add Project Size to dashboard charts #10057
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
[dashboard | statistics] Add Project Size to dashboard charts #10057
Conversation
|
@jeffersoncasimir can you add a description here please. Mostly commenting on the design, what is being calculated in the file size. and how to set it up. I glanced quickly at the code and I see several SQL additions and a tool script which is telling me ur caching the sizes rather than calculating them on the fly? assuming its for speed considerations? If a project has DICOMS, NIFTIs and MINCs does it calculate the sum of all those even though its technically the same scans... |
|
@ridz1208 I will add more info above. Ultimately, PHP filesize() function is being used here in the script intended to be run via cron or webhook |
ef15ea3 to
f85a0b1
Compare
driusan
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This widget has been translated and we need to be sure there aren't regressions on the dashboard.
Please rebase the PR (and then some of the comments/fixes might also make more sense and be easier to understand)
263a893 to
15842fa
Compare
|
@driusan I moved the file from dqt to statistics (accidental module choice) and I took a pass at making all strings I encountered translatable |
|
per EEG meeting Oct. 31: @jeffersoncasimir who might be able to quickly review this for merge -- Saagar maybe? |
| filters: '', | ||
| chartType: 'pie', | ||
| dataType: 'pie', | ||
| label: t('Size (GB)', {ns: 'statistics'}), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't see this in the .po file, nor .pot file
| 'project_sizes': { | ||
| 'size_byproject': { | ||
| sizing: 11, | ||
| title: t('Dataset size breakdown by project', {ns: 'statistics'}), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is also not in the locale files
| $values['eeg_data'] = [ | ||
| 'total_recordings' => $eeg_data | ||
| ]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this used anywhere?
skarya22
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.

Closes #9944.
Adds project sizes to the dashboard.
File sizes are read from a cached value in a new DB table for cached data.
Cache data is updated by cron or webhook via a new script called
update_projects_disk_space.php.This script recursively calculates the file sizes of a dataset recursively by using the php
filesizefunction. It only ignores.tgzfiles, which are not BIDS-recognized and used for LORIS purposes.Screenshots:


